package com.bmob.im.demo.db;

import android.content.Context;
import android.util.Log;

import com.bmob.im.demo.bean.Note;
import com.j256.ormlite.dao.Dao;

import java.sql.SQLException;

/**
 * ************************************************************
 * *********    User : SuLinger(462679107@qq.com) .
 * *********    Date : 2014-09-19  .
 * *********    Time:  2014-09-19  .
 * *********    Project name :DianDi1.1.5 .
 * *********    Copyright @ 2014, SuLinger, All Rights Reserved
 * *************************************************************
 */


public class NoteDao extends BaseDao<Note> {
    private String TAG = getClass().getSimpleName();

    public NoteDao(Context context) {
        super(context);
    }

    @Override
    public Dao<Note, Integer> getDao() {
        if (mDao == null) {
            try {
                mDao = getHelper().getDao(Note.class);
            } catch (SQLException e) {
                Log.e(TAG, "得到Dao失败");
                e.printStackTrace();
            }
        }
        return null;
    }


}
